// 导入工具类 @项目根路径
import request from "@/utils/request"

//获取医师信息
export const getDoctorMsg = (doctor) => {
    //数据处理
    if(doctor.flag==0){
        return request.get("/doctor/getAllDoctorsValid",doctor);
    }else{
        return request.get("/doctor/getAllDoctorsUnValid",doctor);
    }
}
//通过类型获取医师信息
export const getDoctorMsgByType = (type,flag) => {
    //数据处理
    if(flag==0){
        return request.get(`/doctor/getDoctorsValidByType?type=${type}`);
    }else{
        return request.get(`/doctor/getDoctorsUnValidByType?type=${type}`);
    }
   
}
//添加医师信息
export const addDoctor = (doctor) => {
    //数据处理
    return request.post("/doctor/addDoctor",doctor);
}
//修改医师信息
export const updateDoctor = () => {
    //数据处理
    return request.post("/doctor/updateDoctor");
}
//注销医师信息
export const deleteDoctor = (id) => {
    //数据处理
    return request.get(`/doctor/delDoctor?id=${id}`);
}
//获取医师擅长领域
export const getAllType = () => {
    //数据处理
    return request.get("/requirement-type/getAllType");
}